<template>
  <div class="v-header border-bottom">
    <div class="back" @click="exit"><img src="../../assets/images/back.png" alt=""/></div>
    <div class="header-title">用户选择</div>
  </div>
</template>
<script>
  export default{
//    props:['text','title'],
    data:function () {
      return{
        stuNo:'',
        uumsType:''
      }
    },
    methods:{
       exit:function () {
         var ua = navigater.userAgent.toLowerCase();
         var isWeixin = ua.indexOf('micromessenger') != -1;
         if(isWeixin){
           WeixinJSBridge.call('closeWindow');
         }else{
           var ua = navigator.userAgent.toLowerCase();
           if(ua.indexOf('iphone') > 0){
             window.location.href='sn://back';
           }
           else if(ua.indexOf('android') >0){
             window.jsInteration.returnResult();
           }
           else{
             window.history.back();
           }
         }
       },
      getdata:function () {
        this.$http.get("http://192.168.10.53:8068/WefService/mif/mLogin_loginStuByUUMS.do",{stuNo:this.stuNo,uumsType:this.uumsType},{emulateJSON:true,credentials:true}).then(
          function (res) {
            //处理成功的结果
            console.log(res);
            var resdata = JSON.parse(res.bodyText);
            if(resdata.status == 1){

            }
          },function (res) {
            //处理失败的结果
          }
        );
      }
    },
    mounted:function () {
      this.getdata(); //vue完成时
    }
  }
</script>
<style>
  .v-header{
    height:.55rem;
    width:100%;
    background-color: #fff;
    position: relative;
  }
  .v-header .back img{
    position: absolute;
    width: .11rem;
    height: .18rem;
    left: .15rem;
    top:.17rem;
  }
  .v-header .header-title{
    font-size: .18rem;
    color: #333;
    font-family: "microsoft yahei";
    line-height: .55rem;
    text-align: center;
  }
</style>
